package com.irdstudio.rsp.drools.exception;

/**
 * 规则集异常类
 */
public class FireRuleException extends RuntimeException {

    private String errorCode;

    private String errorMsg;

    public FireRuleException(String errorCode, String errorMsg, Throwable cause) {
        super(errorCode + "-" + errorMsg, cause);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public FireRuleException(String errorCode, String errorMsg) {
        super(errorCode + "-" + errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getErrorMessage() {
        return errorCode + "-" + errorMsg;
    }
}
